using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

using NHibernate;
using Castle.Facilities.NHibernateIntegration;
using Castle.Facilities.NHibernateIntegration.Components.Dao;
using Redboil.Bfp.Dao;

namespace Redboil.Bfp.Dao.NHibernate {
    public class TansportOrderDaoImpl : ITransportOrderDao {
        //private ISession session;
        private NHibernateGenericDao dao;

        public TansportOrderDaoImpl(ISessionManager sessionManager) {
            //session = sessionManager.OpenSession();
            this.dao = new NHibernateGenericDao(sessionManager, "sqlite");
        }

        public IList<TransportOrder> FindAll<TransportOrder>() {
            return this.dao.FindAll(typeof(TransportOrder)) as IList<TransportOrder>;
        }
    }
}
